/**
 * 
 */
package com.earltech.service;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author jiangjintai
 *
 */
public abstract class BaseService <T,I extends Serializable>{
	
	protected abstract JpaRepository<T, I> getDao();
	public void save(T tb){
		this.getDao().save(tb);
	}
	
	public void findOne(I id){
		this.getDao().findOne(id);
	}
	
	public List<T> findAll(){
		return this.getDao().findAll();
	}
}
